package com.java0107;

import java.util.Map;
import java.util.TreeMap;

public class Java06 {
    public static void main(String[] args) {
        Map<Integer,String> map = new TreeMap<>();//Tree排序 按key键排序

        map.put(2,"张三");
        map.put(1,"李四");
        map.forEach((k,v)->{
            System.out.println(k+"\t"+v);
        });
    }
}
